import request from "@/api/request"
export const getAllTeacher=(data)=>{
    return request({
        url:`/coach/${data.pageNum}/${data.pageSize}`
    })
}

export const getBestTeacher=()=>{
    return request({
        url:'/coach/best'
    })
}
export const getTeacherPlace=(id)=>{
    return request({
        url:`/coach/place/${id}`
    })
}
export const UpdateStatus=(id,status)=>{
    return request({
        url:'/coach',
        method:'PUT',
        data:{id,status}
    })
}
export const UpdateTeacher=(data)=>{
    return request({
        url:'/coach',
        method:'PUT',
        data
    })
}
export const UpdateTPassword=(data)=>{
    return request({
        url:'/coach/update',
        method:'PUT',
        data
    })
}
export const LoginTeacher=(data)=>{
    return request({
        url:'/coach/login',
        method:'POST',
        data
    })
}
export const InsertTeacher=(data)=>{
    return request({
        url:'/coach/register',
        method:'POST',
        data
    })
}
export const getTeacherById=(id)=>{
    return request({
        url:`/coach/${id}`,
        method:'GET',
    })
}
export const getTeacherGradeById=(id)=>{
    return request({
        url:`/coach/grade/${id}`,
        method:'GET',
    })
}
export const deleteTeacherById=(id)=>{
    return request({
        url:`/coach/${id}`,
        method:'DELETE',
    })
}